{extend name="adminheader:header"/}
{block name="content"}
<style type="text/css">
    thead tr th{
        text-align: center;
    }
    tbody tr td{
        text-align: center;
    }
</style>
<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>{$user.u_name}的收货地址列表</h5>
                        <a class="btn btn-default" style="float:right;" href="{:url('/admin/User/partner')}">返回合伙人列表</a>
                    </div>
                    <div class="ibox-content">
                        <div class="table-responsive">
                            <table class="table table-striped table-hover ">
                                <thead>
                                    <tr>
                                        <th>序号</th>
                                        <th>会员姓名</th>
                                        <th>收货人</th>
                                        <th>收货人手机号码</th>
                                        <th>收货人地址</th>
                                        <th>状态</th>
                                        <th>添加时间</th>
                                        <th>操作</th>
                                    </tr>
                                </thead>
                                <tbody>
                                {if condition="$list neq null"}
                                    {volist name="list" id="vo"}
                                        <tr>
                                            <td>{$vo.id}</td>
                                            <td>{$vo.u_name}</td>
                                            <td>{$vo.a_name}</td>
                                            <td>{$vo.a_tel}</td>
                                            <td>{$vo.a_address}</td> 
                                            {if condition="$vo.a_status eq 1"}
                                                <td style="color: #0000FF;">默认地址</td>
                                            {elseif condition="$vo.a_status eq 2"/}
                                                <td>其他地址</td>
                                            {/if}
                                            <td>{:date('Y-m-d H:i',$vo['addtime'])}</td>
                                            <td>
                                                <a href="{:url('/admin/User/editAddress',array('id'=>$vo['id'],'uid'=>$vo['uid']))}" class="btn btn-primary">编辑</a>
                                                <a href="{:url('/admin/User/deleteAddress',array('id'=>$vo['id'],'uid'=>$vo['uid']))}" class="btn btn-danger js-ajax-delete">删除</a>
                                            </td>
                                        </tr>
                                    {/volist}
                                {else/}
                                    <tr>
                                        <td style="font-size:20px;text-align:center">暂无数据</td>
                                    </tr>
                                {/if}
                                </tbody>
                            </table>
                            <div class="text-left pages">
                                {$page}
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
<script src="/admin/js/admin.js"></script>
{/block}